package org.dromara.report.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import lombok.RequiredArgsConstructor;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.web.core.BaseService;
import org.dromara.report.domain.ReportStock;
import org.dromara.report.service.ReportStockServiceImpl;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 首页获取展示信息
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/report/stock")
public class ReportStockController extends BaseService {

  private final ReportStockServiceImpl reportStockService;

  /**
   * 首页获取订单消息信息
   */
  @SaCheckPermission("report:stock:getList")
  @GetMapping("/getList")
  public TableDataInfo<ReportStock> getStockList() {
    return TableDataInfo.build(reportStockService.getStockNum());
  }

}
